package by.amakarevich.services;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import by.amakarevich.datamodel.Product;
import by.amakarevich.datamodel.Thread;

public interface ThreadService {
	
	@Transactional
	void createNewThread(Thread thread, Product product);
	
	@Transactional
	Thread get(Long id);
	
	@Transactional
	void updateThread(Thread thread);
	
	@Transactional
	void removeThread(Long id);
	
	@Transactional
    void deleteAll();
	
	List <Thread> getAllThread();
	
	Thread getByProductId(Product product);

}
